<!DOCTYPE html>
<html lang="en-US">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="language" content="en" />
        <link href="./assets/ffd55088/css/bootstrap.css" rel="stylesheet">
<link href="./assets/5cf9384a/solarized_light.css" rel="stylesheet">
<link href="./assets/6c54116e/style.css" rel="stylesheet">
<script src="./assets/a44cef0f/jquery.js"></script>
<script src="./assets/ffd55088/js/bootstrap.js"></script>
<script src="./assets/8ac4e28a/jssearch.js"></script>    <title>Yii Framework 2.0 API Documentation</title>
</head>
<body>

<div class="wrap">
    <nav id="w13597" class="navbar-inverse navbar-fixed-top navbar" role="navigation"><div class="navbar-header"><button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#w13597-collapse"><span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span></button><a class="navbar-brand" href="./index.html">Yii Framework 2.0 API Documentation</a></div><div id="w13597-collapse" class="collapse navbar-collapse"><ul id="w13598" class="navbar-nav nav"><li><a href="./index.html">Class reference</a></li>
<li class="dropdown"><a class="dropdown-toggle" href="#" data-toggle="dropdown">Extensions <b class="caret"></b></a><ul id="w13599" class="dropdown-menu"><li><a href="./ext-apidoc-index.html" tabindex="-1">apidoc</a></li>
<li><a href="./ext-authclient-index.html" tabindex="-1">authclient</a></li>
<li><a href="./ext-bootstrap-index.html" tabindex="-1">bootstrap</a></li>
<li><a href="./ext-codeception-index.html" tabindex="-1">codeception</a></li>
<li><a href="./ext-debug-index.html" tabindex="-1">debug</a></li>
<li><a href="./ext-elasticsearch-index.html" tabindex="-1">elasticsearch</a></li>
<li><a href="./ext-faker-index.html" tabindex="-1">faker</a></li>
<li><a href="./ext-gii-index.html" tabindex="-1">gii</a></li>
<li><a href="./ext-imagine-index.html" tabindex="-1">imagine</a></li>
<li><a href="./ext-jui-index.html" tabindex="-1">jui</a></li>
<li><a href="./ext-mongodb-index.html" tabindex="-1">mongodb</a></li>
<li><a href="./ext-redis-index.html" tabindex="-1">redis</a></li>
<li><a href="./ext-smarty-index.html" tabindex="-1">smarty</a></li>
<li><a href="./ext-sphinx-index.html" tabindex="-1">sphinx</a></li>
<li><a href="./ext-swiftmailer-index.html" tabindex="-1">swiftmailer</a></li>
<li><a href="./ext-twig-index.html" tabindex="-1">twig</a></li></ul></li>
<li><a href="./guide-README.html">Guide</a></li></ul><div class="navbar-form navbar-left" role="search">
  <div class="form-group">
    <input id="searchbox" type="text" class="form-control" placeholder="Search">
  </div>
</div>
</div></nav>
    <div id="search-resultbox" style="display: none;" class="modal-content">
        <ul id="search-results">
        </ul>
    </div>

    
<div class="row">
    <div class="col-md-3">
                <div id="navigation" class="list-group"><a class="list-group-item" href="#navigation-13586" data-toggle="collapse" data-parent="#navigation">yii\apidoc\commands <b class="caret"></b></a><div id="navigation-13586" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-apidoc-commands-apicontroller.html">ApiController</a>
<a class="list-group-item" href="./yii-apidoc-commands-guidecontroller.html">GuideController</a></div>
<a class="list-group-item" href="#navigation-13587" data-toggle="collapse" data-parent="#navigation">yii\apidoc\components <b class="caret"></b></a><div id="navigation-13587" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-apidoc-components-basecontroller.html">BaseController</a></div>
<a class="list-group-item" href="#navigation-13588" data-toggle="collapse" data-parent="#navigation">yii\apidoc\helpers <b class="caret"></b></a><div id="navigation-13588" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-apidoc-helpers-apiindexer.html">ApiIndexer</a>
<a class="list-group-item" href="./yii-apidoc-helpers-apimarkdown.html">ApiMarkdown</a>
<a class="list-group-item" href="./yii-apidoc-helpers-apimarkdownlatex.html">ApiMarkdownLaTeX</a>
<a class="list-group-item" href="./yii-apidoc-helpers-apimarkdowntrait.html">ApiMarkdownTrait</a>
<a class="list-group-item" href="./yii-apidoc-helpers-indexfileanalyzer.html">IndexFileAnalyzer</a>
<a class="list-group-item" href="./yii-apidoc-helpers-prettyprinter.html">PrettyPrinter</a></div>
<a class="list-group-item" href="#navigation-13589" data-toggle="collapse" data-parent="#navigation">yii\apidoc\models <b class="caret"></b></a><div id="navigation-13589" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-apidoc-models-basedoc.html">BaseDoc</a>
<a class="list-group-item" href="./yii-apidoc-models-classdoc.html">ClassDoc</a>
<a class="list-group-item" href="./yii-apidoc-models-constdoc.html">ConstDoc</a>
<a class="list-group-item" href="./yii-apidoc-models-context.html">Context</a>
<a class="list-group-item" href="./yii-apidoc-models-eventdoc.html">EventDoc</a>
<a class="list-group-item" href="./yii-apidoc-models-functiondoc.html">FunctionDoc</a>
<a class="list-group-item" href="./yii-apidoc-models-interfacedoc.html">InterfaceDoc</a>
<a class="list-group-item" href="./yii-apidoc-models-methoddoc.html">MethodDoc</a>
<a class="list-group-item" href="./yii-apidoc-models-paramdoc.html">ParamDoc</a>
<a class="list-group-item" href="./yii-apidoc-models-propertydoc.html">PropertyDoc</a>
<a class="list-group-item" href="./yii-apidoc-models-traitdoc.html">TraitDoc</a>
<a class="list-group-item" href="./yii-apidoc-models-typedoc.html">TypeDoc</a></div>
<a class="list-group-item" href="#navigation-13590" data-toggle="collapse" data-parent="#navigation">yii\apidoc\renderers <b class="caret"></b></a><div id="navigation-13590" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-apidoc-renderers-apirenderer.html">ApiRenderer</a>
<a class="list-group-item" href="./yii-apidoc-renderers-baserenderer.html">BaseRenderer</a>
<a class="list-group-item" href="./yii-apidoc-renderers-guiderenderer.html">GuideRenderer</a></div>
<a class="list-group-item" href="#navigation-13591" data-toggle="collapse" data-parent="#navigation">yii\apidoc\templates\bootstrap <b class="caret"></b></a><div id="navigation-13591" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-apidoc-templates-bootstrap-apirenderer.html">ApiRenderer</a>
<a class="list-group-item" href="./yii-apidoc-templates-bootstrap-guiderenderer.html">GuideRenderer</a>
<a class="list-group-item" href="./yii-apidoc-templates-bootstrap-renderertrait.html">RendererTrait</a>
<a class="list-group-item" href="./yii-apidoc-templates-bootstrap-sidenavwidget.html">SideNavWidget</a></div>
<a class="list-group-item" href="#navigation-13592" data-toggle="collapse" data-parent="#navigation">yii\apidoc\templates\bootstrap\assets <b class="caret"></b></a><div id="navigation-13592" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-apidoc-templates-bootstrap-assets-assetbundle.html">AssetBundle</a>
<a class="list-group-item" href="./yii-apidoc-templates-bootstrap-assets-highlightbundle.html">HighlightBundle</a>
<a class="list-group-item" href="./yii-apidoc-templates-bootstrap-assets-jssearchasset.html">JsSearchAsset</a></div>
<a class="list-group-item" href="#navigation-13593" data-toggle="collapse" data-parent="#navigation">yii\apidoc\templates\html <b class="caret"></b></a><div id="navigation-13593" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-apidoc-templates-html-apirenderer.html">ApiRenderer</a>
<a class="list-group-item" href="./yii-apidoc-templates-html-guiderenderer.html">GuideRenderer</a></div>
<a class="list-group-item" href="#navigation-13594" data-toggle="collapse" data-parent="#navigation">yii\apidoc\templates\json <b class="caret"></b></a><div id="navigation-13594" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-apidoc-templates-json-apirenderer.html">ApiRenderer</a></div>
<a class="list-group-item" href="#navigation-13595" data-toggle="collapse" data-parent="#navigation">yii\apidoc\templates\online <b class="caret"></b></a><div id="navigation-13595" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-apidoc-templates-online-apirenderer.html">ApiRenderer</a></div>
<a class="list-group-item" href="#navigation-13596" data-toggle="collapse" data-parent="#navigation">yii\apidoc\templates\pdf <b class="caret"></b></a><div id="navigation-13596" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-apidoc-templates-pdf-guiderenderer.html">GuideRenderer</a></div></div>    </div>
    <div class="col-md-9 api-content" role="main">
        <h1>API documentation generator for Yii 2 <span id="api-documentation-generator-for-yii-2"></span><a href="#api-documentation-generator-for-yii-2" class="hashlink">&para;</a></h1>
<div class="toc"><ol><li><a href="#installation">Installation</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#special-markdown-syntax">Special Markdown Syntax</a></li>
<li><a href="#creating-your-own-templates">Creating your own templates</a></li>
<li><a href="#using-the-model-layer">Using the model layer</a></li></ol></div>
<p>This extension provides an API documentation generator for the <a href="http://www.yiiframework.com">Yii framework 2.0</a>.</p>
<p>For license information check the <a href="LICENSE.md">LICENSE</a>-file.</p>
<p><a href="https://packagist.org/packages/yiisoft/yii2-apidoc"><img src="https://poser.pugx.org/yiisoft/yii2-apidoc/v/stable.png" alt="Latest Stable Version" /></a>
<a href="https://packagist.org/packages/yiisoft/yii2-apidoc"><img src="https://poser.pugx.org/yiisoft/yii2-apidoc/downloads.png" alt="Total Downloads" /></a></p>
<h2>Installation <span id="installation"></span><a href="#installation" class="hashlink">&para;</a></h2><p>The preferred way to install this extension is through <a href="http://getcomposer.org/download/">composer</a>.</p>
<p>Either run</p>
<pre><code class="hljs nginx"><span class="hljs-title">composer</span> require --prefer-dist yiisoft/yii2-apidoc
</code></pre>
<p>The above command may not work on an existing project due to version conflicts that need to be resolved, so it is preferred to add the package manually to the require section of your composer.json:</p>
<pre><code class="hljs json language-json"><span class="hljs-string">"yiisoft/yii2-apidoc"</span>: <span class="hljs-string">"~2.0.0"</span>
</code></pre>
<p>afterwards run <code>composer update</code>. You may also run <code>composer update yiisoft/yii2-apidoc cebe/markdown</code> if you want to avoid updating unrelated packages.</p>
<h2>Usage <span id="usage"></span><a href="#usage" class="hashlink">&para;</a></h2><p>This extension offers two commands:</p>
<ul>
<li><code>api</code> to generate class API documentation.</li>
<li><code>guide</code> to render nice HTML pages from markdown files such as the yii guide.</li>
</ul>
<p>Simple usage for stand alone class documentation:</p>
<pre><code class="hljs bash">vendor/bin/apidoc api <span class="hljs-built_in">source</span>/directory ./output
</code></pre>
<p>Simple usage for stand alone guide documentation:</p>
<pre><code class="hljs bash">vendor/bin/apidoc guide <span class="hljs-built_in">source</span>/docs ./output
</code></pre>
<p>You can combine them to generate class API and guide documentation in one place:</p>
<pre><code class="hljs bash"><span class="hljs-comment"># generate API docs</span>
vendor/bin/apidoc api <span class="hljs-built_in">source</span>/directory ./output
<span class="hljs-comment"># generate the guide (order is important to allow the guide to link to the apidoc)</span>
vendor/bin/apidoc guide <span class="hljs-built_in">source</span>/docs ./output
</code></pre>
<p>By default the <code>bootstrap</code> template will be used. You can choose a different template with the <code>--template=name</code> parameter.
Currently there is only the <code>bootstrap</code> template available.</p>
<p>You may also add the <code>yii\apidoc\commands\ApiController</code> and <code>GuideController</code> to your console application command map
and run them inside of your applications console app.</p>
<h3>Advanced usage <span id="advanced-usage"></span><a href="#advanced-usage" class="hashlink">&para;</a></h3><p>The following script can be used to generate API documentation and guide in different directories and also multiple guides
in different languages (like it is done on yiiframework.com):</p>
<pre><code class="hljs bash language-sh"><span class="hljs-shebang">#!/bin/sh
</span>
<span class="hljs-comment"># set these paths to match your environment</span>
YII_PATH=~/dev/yiisoft/yii2
APIDOC_PATH=~/dev/yiisoft/yii2/extensions/apidoc
OUTPUT=yii2docs

<span class="hljs-built_in">cd</span> <span class="hljs-variable">$APIDOC_PATH</span>
./apidoc api <span class="hljs-variable">$YII_PATH</span>/framework/,<span class="hljs-variable">$YII_PATH</span>/extensions <span class="hljs-variable">$OUTPUT</span>/api --guide=../guide-en --guidePrefix= --interactive=<span class="hljs-number">0</span>
./apidoc guide <span class="hljs-variable">$YII_PATH</span>/docs/guide    <span class="hljs-variable">$OUTPUT</span>/guide-en --apiDocs=../api --guidePrefix= --interactive=<span class="hljs-number">0</span>
./apidoc guide <span class="hljs-variable">$YII_PATH</span>/docs/guide-ru <span class="hljs-variable">$OUTPUT</span>/guide-ru --apiDocs=../api --guidePrefix= --interactive=<span class="hljs-number">0</span>
<span class="hljs-comment"># repeat the last line for more languages</span>
</code></pre>
<h3>Creating a PDF of the guide <span id="creating-a-pdf-of-the-guide"></span><a href="#creating-a-pdf-of-the-guide" class="hashlink">&para;</a></h3><p>You need <code>pdflatex</code> and GNU <code>make</code> for this.</p>
<pre><code class="hljs bash">vendor/bin/apidoc guide <span class="hljs-built_in">source</span>/docs ./output --template=pdf
<span class="hljs-built_in">cd</span> ./output
make pdf
</code></pre>
<p>If all runs without errors the PDF will be <code>guide.pdf</code> in the <code>output</code> dir.</p>
<h2>Special Markdown Syntax <span id="special-markdown-syntax"></span><a href="#special-markdown-syntax" class="hashlink">&para;</a></h2><p>We have a special Syntax for linking to classes in the API documentation.
See the <a href="https://github.com/yiisoft/yii2/blob/master/docs/internals/core-code-style.md#markdown">code style guide</a> for details.</p>
<h2>Creating your own templates <span id="creating-your-own-templates"></span><a href="#creating-your-own-templates" class="hashlink">&para;</a></h2><p>TDB</p>
<h2>Using the model layer <span id="using-the-model-layer"></span><a href="#using-the-model-layer" class="hashlink">&para;</a></h2><p>TDB</p>
<h1>Class Reference</h1>

<table class="summaryTable docIndex table table-bordered table-striped table-hover">
    <colgroup>
        <col class="col-package" />
        <col class="col-class" />
        <col class="col-description" />
    </colgroup>
    <tr>
        <th>Class</th>
        <th>Description</th>
    </tr>
    <tr>
        <td><a href="yii-apidoc-commands-apicontroller.html">yii\apidoc\commands\ApiController</a></td>
        <td>Generate class API documentation.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-commands-guidecontroller.html">yii\apidoc\commands\GuideController</a></td>
        <td>This command can render documentation stored as markdown files such as the yii guide
or your own applications documentation setup.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-components-basecontroller.html">yii\apidoc\components\BaseController</a></td>
        <td>Command to render API Documentation files</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-helpers-apiindexer.html">yii\apidoc\helpers\ApiIndexer</a></td>
        <td>ApiIndexer indexes framework API</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-helpers-apimarkdown.html">yii\apidoc\helpers\ApiMarkdown</a></td>
        <td>A Markdown helper with support for class reference links.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-helpers-apimarkdownlatex.html">yii\apidoc\helpers\ApiMarkdownLaTeX</a></td>
        <td>A Markdown helper with support for class reference links.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-helpers-apimarkdowntrait.html">yii\apidoc\helpers\ApiMarkdownTrait</a></td>
        <td>Class ApiMarkdownTrait</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-helpers-indexfileanalyzer.html">yii\apidoc\helpers\IndexFileAnalyzer</a></td>
        <td>IndexFileAnalyzer analyzes index file with TOC. Typically README.md.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-helpers-prettyprinter.html">yii\apidoc\helpers\PrettyPrinter</a></td>
        <td>Enhances the phpDocumentor PrettyPrinter with short array syntax</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-models-basedoc.html">yii\apidoc\models\BaseDoc</a></td>
        <td>Base class for API documentation information.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-models-classdoc.html">yii\apidoc\models\ClassDoc</a></td>
        <td>Represents API documentation information for a <code>class</code>.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-models-constdoc.html">yii\apidoc\models\ConstDoc</a></td>
        <td>Represents API documentation information for a <code>constant</code>.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-models-context.html">yii\apidoc\models\Context</a></td>
        <td></td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-models-eventdoc.html">yii\apidoc\models\EventDoc</a></td>
        <td>Represents API documentation information for an <code>event</code>.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-models-functiondoc.html">yii\apidoc\models\FunctionDoc</a></td>
        <td>Represents API documentation information for a <code>function</code>.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-models-interfacedoc.html">yii\apidoc\models\InterfaceDoc</a></td>
        <td>Represents API documentation information for an <code>interface</code>.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-models-methoddoc.html">yii\apidoc\models\MethodDoc</a></td>
        <td>Represents API documentation information for a <code>method</code>.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-models-paramdoc.html">yii\apidoc\models\ParamDoc</a></td>
        <td>Represents API documentation information for a <a href="yii-apidoc-models-functiondoc.html">function</a> or <a href="yii-apidoc-models-methoddoc.html">method</a> <code>param</code>.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-models-propertydoc.html">yii\apidoc\models\PropertyDoc</a></td>
        <td>Represents API documentation information for a <code>property</code>.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-models-traitdoc.html">yii\apidoc\models\TraitDoc</a></td>
        <td>Represents API documentation information for a <code>trait</code>.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-models-typedoc.html">yii\apidoc\models\TypeDoc</a></td>
        <td>Base class for API documentation information for classes, interfaces and traits.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-renderers-apirenderer.html">yii\apidoc\renderers\ApiRenderer</a></td>
        <td>Base class for all API documentation renderers</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-renderers-baserenderer.html">yii\apidoc\renderers\BaseRenderer</a></td>
        <td>Base class for all documentation renderers</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-renderers-guiderenderer.html">yii\apidoc\renderers\GuideRenderer</a></td>
        <td>Base class for all Guide documentation renderers</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-templates-bootstrap-apirenderer.html">yii\apidoc\templates\bootstrap\ApiRenderer</a></td>
        <td></td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-templates-bootstrap-guiderenderer.html">yii\apidoc\templates\bootstrap\GuideRenderer</a></td>
        <td></td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-templates-bootstrap-renderertrait.html">yii\apidoc\templates\bootstrap\RendererTrait</a></td>
        <td>Common methods for renderers</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-templates-bootstrap-sidenavwidget.html">yii\apidoc\templates\bootstrap\SideNavWidget</a></td>
        <td>Nav renders a nav HTML component.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-templates-bootstrap-assets-assetbundle.html">yii\apidoc\templates\bootstrap\assets\AssetBundle</a></td>
        <td>The asset bundle for the offline template.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-templates-bootstrap-assets-highlightbundle.html">yii\apidoc\templates\bootstrap\assets\HighlightBundle</a></td>
        <td>The asset bundle for the highlight.js styles.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-templates-bootstrap-assets-jssearchasset.html">yii\apidoc\templates\bootstrap\assets\JsSearchAsset</a></td>
        <td>The asset bundle for the offline template.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-templates-html-apirenderer.html">yii\apidoc\templates\html\ApiRenderer</a></td>
        <td>The base class for HTML API documentation renderers.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-templates-html-guiderenderer.html">yii\apidoc\templates\html\GuideRenderer</a></td>
        <td></td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-templates-json-apirenderer.html">yii\apidoc\templates\json\ApiRenderer</a></td>
        <td>The class for outputting documentation data structures as a JSON text.</td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-templates-online-apirenderer.html">yii\apidoc\templates\online\ApiRenderer</a></td>
        <td></td>
    </tr>
    <tr>
        <td><a href="yii-apidoc-templates-pdf-guiderenderer.html">yii\apidoc\templates\pdf\GuideRenderer</a></td>
        <td></td>
    </tr>
</table>
    </div>
</div>

<script type="text/javascript">
    /*<![CDATA[*/
    $("a.toggle").on('click', function () {
        var $this = $(this);
        if ($this.hasClass('properties-hidden')) {
            $this.text($this.text().replace(/Show/,'Hide'));
            $this.parents(".summary").find(".inherited").show();
            $this.removeClass('properties-hidden');
        } else {
            $this.text($this.text().replace(/Hide/,'Show'));
            $this.parents(".summary").find(".inherited").hide();
            $this.addClass('properties-hidden');
        }

        return false;
    });
    /*
     $(".sourceCode a.show").toggle(function () {
     $(this).text($(this).text().replace(/show/,'hide'));
     $(this).parents(".sourceCode").find("div.code").show();
     },function () {
     $(this).text($(this).text().replace(/hide/,'show'));
     $(this).parents(".sourceCode").find("div.code").hide();
     });
     $("a.sourceLink").click(function () {
     $(this).attr('target','_blank');
     });
     */
    /*]]>*/
</script>


</div>

<footer class="footer">
        <p class="pull-right"><small>Page generated on Sat, 09 Jul 2016 12:16:01 +0000</small></p>
    Powered by <a href="http://www.yiiframework.com/" rel="external">Yii Framework</a></footer>

<script type="text/javascript">jQuery(document).ready(function () {
    var shiftWindow = function () { scrollBy(0, -50) };
    if (location.hash) setTimeout(shiftWindow, 1);
    window.addEventListener("hashchange", shiftWindow);
var element = document.createElement("script");
element.src = "./jssearch.index.js";
document.body.appendChild(element);

var searchBox = $('#searchbox');

// search when typing in search field
searchBox.on("keyup", function(event) {
    var query = $(this).val();

    if (query == '' || event.which == 27) {
        $('#search-resultbox').hide();
        return;
    } else if (event.which == 13) {
        var selectedLink = $('#search-resultbox a.selected');
        if (selectedLink.length != 0) {
            document.location = selectedLink.attr('href');
            return;
        }
    } else if (event.which == 38 || event.which == 40) {
        $('#search-resultbox').show();

        var selected = $('#search-resultbox a.selected');
        if (selected.length == 0) {
            $('#search-results').find('a').first().addClass('selected');
        } else {
            var next;
            if (event.which == 40) {
                next = selected.parent().next().find('a').first();
            } else {
                next = selected.parent().prev().find('a').first();
            }
            if (next.length != 0) {
                var resultbox = $('#search-results');
                var position = next.position();

//              TODO scrolling is buggy and jumps around
//                resultbox.scrollTop(Math.floor(position.top));
//                console.log(position.top);

                selected.removeClass('selected');
                next.addClass('selected');
            }
        }

        return;
    }
    $('#search-resultbox').show();
    $('#search-results').html('<li><span class="no-results">No results</span></li>');

    var result = jssearch.search(query);

    if (result.length > 0) {
        var i = 0;
        var resHtml = '';

        for (var key in result) {
            if (i++ > 20) {
                break;
            }
            resHtml = resHtml +
            '<li><a href="' + result[key].file.u.substr(3) +'"><span class="title">' + result[key].file.t + '</span>' +
            '<span class="description">' + result[key].file.d + '</span></a></li>';
        }
        $('#search-results').html(resHtml);
    }
});

// hide the search results on ESC
$(document).on("keyup", function(event) { if (event.which == 27) { $('#search-resultbox').hide(); } });
// hide search results on click to document
$(document).bind('click', function (e) { $('#search-resultbox').hide(); });
// except the following:
searchBox.bind('click', function(e) { e.stopPropagation(); });
$('#search-resultbox').bind('click', function(e) { e.stopPropagation(); });

});</script></body>
</html>
